package net.ib.mtalk.ui.favorite;

import net.ib.mtalk.constant.MTalkConstant;
import net.ib.mtalk.network.NetResultReceiver;
import net.ib.mtalk.network.task.AllAddContactsTask;
import net.ib.mtalk.ui.UIController;
import net.ib.mtalk.util.MTalkLogWriter;
import net.ib.mtalk.util.NotifyingAsyncQueryHandler;
import android.content.Context;
import android.os.Handler;
import android.util.Log;

public class FavoriteController extends UIController {
	
private NetResultReceiver mReceiver;
	
	private Handler mUiHandler = new Handler();
	
	private NotifyingAsyncQueryHandler mQueryHandler;

	public FavoriteController(Context context, Handler handler) {
		super(context, handler);
		mUiHandler = handler;
	}
	
	/**
	 * Add all Contacts at Server
	 */
	public void addAllContacts(){
		try{
			MTalkLogWriter.d("FavoriteController.addAllContacts()");
			AllAddContactsTask task = new AllAddContactsTask(mContext, mUiHandler);
			task.execute();
		} catch(Exception e) {
			Log.e(MTalkConstant.TAG, "addAllContacts", e);
		}
	}

}
